<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>农资与农产品全程供应链物流平台-订单录入</title>
<meta name="kewywords" content="农资与农产品全程供应链物流平台"/>
<meta name="description" content="农资与农产品全程供应链物流平台"/>
<link href="css/style.css" type="text/css" rel="stylesheet"/>
<link type="text/css" rel="stylesheet" href="css/jquery-ui.css" />	
<script language="javascript" type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="js/dialog/lhgdialog.js?skin=default"></script>	
	<script type="text/javascript">
		$(document).ready(function(){
			if($("#sendDate").val() != "" ){
				$("#senddate").val($("#sendDate").val());
				//alert($("#senddate").val());
			}
			if ($("#tipMessage").val() == "duplicate_id") {
				$.dialog.alert("订单号重复!");
			}			
		});
		
		$(function(){
			$("#senddate").datepicker({					
				changeMonth: true,
      			changeYear: true,
      			dateFormat: "yy-mm-dd",
      			showButtonPanel: true,
      			yearRange: "2000:2013",
      			closeText: "Close",
      			currentText: "Now" //,
      			//monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]     			
			});			
		});	
		function saveCheck(){
			if($("#recipient").val() == ""){
				alert("请输入收件人姓名");
				return false;
			}
			if($("#recipienttel").val() == ""){
				alert("请输入收件人电话");
				return false;
			}
			if($("#recipientaddr").val() == ""){
				alert("请输入收件人地址");
				return false;
			}
			if($("#origin").val() == ""){
				alert("请填写原寄地");
				return false;
			}
			if($("#destination").val() == ""){
				alert("请填写目的地");
				return false;
			}
			if($("#quantity").val() == ""){
				alert("请填写物品数量");
				return false;
			}
			if($("#cost").val() == ""){
				alert("请填写费用");
				return false;
			}
			if($("#receiver").val() == ""){
				alert("收件员不能为空");
				return false;
			}
			if($("#senddate").val() == ""){
				alert("请填写收件日期");
				return false;
			}			
			//alert($("#senddate").val());
			$("#orderInfo").submit();
		}			
	</script>
</head>
<body>
<%@include file="top.jsp" %>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	    <td width="187" height="37" bgcolor="#e0e0e0" class="brt bbt">
	    	<div class="topleft fl">系统菜单栏</div>
	    </td>
	    <td bgcolor="#e7e7e7" class=" bbt">
	    	<div class="topleft fl">您现在的位置：<a href="#">首页</a>&nbsp;>&nbsp;<span>订单管理</span></div>
	    </td>
	</tr>
	<tr>
    <td width="187" height="100%" valign="top" bgcolor="#FFFFFF" class="brt">
    	<div class="left_bk">
			<div class="menu2">
             <%@include file="transport_left.jsp" %>
			</div>
        </div></td>
    <td align="left" valign="top" bgcolor="#FFFFFF">
    	<div class="content">
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		        <tr>
					<td height="38" style="background:url(images/zz_tit.jpg) left top repeat-x;">
						<div class="tt_back fl">订单管理</div>
						<div class="fr"><img src="images/tit_right.jpg" alt="" width="103" height="38" /></div>
					</td>
		        </tr>
		        <tr>
		        	<td class="borders btn">
				        <table width="100%" border="0" cellspacing="0" cellpadding="0">
						  	<tr>
							    <td bgcolor="#fffeee" style="border-bottom:#fee7bd solid 1px;" width="460px">
								   	<form action="transport/saveOrder.action" method="post" id="orderInfo">	
								    <s:hidden name="sendDate" id="sendDate"/>
								    <s:hidden name="order.state"/>
								    <s:hidden name="tipMessage" id="tipMessage"/>
								    <div style="height:500px">
								    <table border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top:20px;margin-left: 50px;margin-bottom: 20px; " width="100%">
										<tr style="height: 40px;">
											<td align="right" width="50px">订单号：</td>
											<td width="150px" align="left" valign="middle">
												<input type="text" class="input_are" id="orderid" name="order.id" value="${order.id}" />
											</td>
										    <td align="right" width="50px">寄件日期：</td>
											<td width="150px" align="left" valign="middle">				  				
												<input type="text" id="senddate" name="order.senddate" value="${order.senddate}" class="input_are"/>
											</td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">寄件人姓名：</td>
											<td width="150px;"  align="left" valign="middle">
												<input type="text" id="sender" class="input_are" name="order.sender" value="${order.sender}" /></td>
										    <td align="right" width="50px">收件人姓名：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="recipient" class="input_are" name="order.recipient" value="${order.recipient}" /></td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">寄件人公司：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="senderfirm" class="input_are" name="order.senderfirm" value="${order.senderfirm}" /></td>
										    <td align="right" width="50px">收件人公司：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text"  id="recipientfirm" class="input_are" name="order.recipientfirm" value="${order.recipientfirm}" /></td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">寄件人电话：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="sendertel" class="input_are" name="order.sendertel" value="${order.sendertel}" /></td>
										    <td align="right" width="50px">收件人电话：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="recipienttel" class="input_are" name="order.recipienttel" value="${order.recipienttel}" /></td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">寄件人地址：</td>
											<td width="350px" align="left" valign="middle" colspan="3">												  
												<input type="text" style="width:350px" id="senderaddr" class="input_are" name="order.senderaddr" value="${order.senderaddr}" />
												
											</td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">收件人地址：</td>
											<td width="350px" align="left" valign="middle" colspan="3">
												<input type="text" style="width:350px" id="recipientaddr" class="input_are" name="order.recipientaddr" value="${order.recipientaddr}" /></td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">原寄地：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="origin" class="input_are" name="order.origin" value="${order.origin}" /></td>
										    <td align="right" width="50px">目的地：</td>
											<td width="150px;" align="left" valign="middle">
												<input type="text" id="destination" class="input_are" name="order.destination" value="${order.destination}" /></td>
										</tr>
										<tr style="height: 40px;">
											<td align="right" width="50px">规格：</td>
											<td colspan="3" align="left" valign="middle" width="350px">
												数量
												<input type="text" style="width: 60px;" id="quantity" class="input_are" name="order.quantity" value="${order.quantity}" />&nbsp;&nbsp;&nbsp;&nbsp;
												重量
												<input type="text" style="width: 60px;" id="weight" class="input_are" name="order.weight" value="${order.weight}" />kg&nbsp;&nbsp;&nbsp;&nbsp;
												长
												<input type="text" style="width: 60px;" id="length" class="input_are" name="order.length" value="${order.length}" />m&nbsp;&nbsp;&nbsp;&nbsp;
												宽
												<input type="text" style="width: 60px;" id="width" class="input_are" name="order.width" value="${order.width}" />m&nbsp;&nbsp;&nbsp;&nbsp;
												高
												<input type="text" style="width: 60px;" id="height" class="input_are" name="order.height" value="${order.height}" />m&nbsp;&nbsp;
											</td>
										</tr>
										<!-- 
										<tr style="height: 40px;"> 										
											<td align="right">收件日期：</td>
											<td width="180px;">				  				
												<input type="text" id="receivedate" name="receivedate" style="width: 200px;" class="input_are w122"  size="10"/>
											</td>			  			
										</tr> -->
										<tr style="height: 40px;">
											<td align="right" width="50px">费用：</td>
											<td width="150px;" align="left" valign="middle">				  				
												<input type="text" id="cost" class="input_are"  name="order.cost" value="${order.cost}"/>
											</td>
											<td align="right" width="50px">收件员：</td>
											<td width="150px;" align="left" valign="middle">				  				
												<input type="text" id="receiver" class="input_are"  name="order.receiver" value="${order.receiver}"/>
											</td>			  			
										</tr>
										<tr style="height: 40px;">											
											<td align="right" width="50px">备注：</td>
											<td width="350px;" align="left" valign="middle" colspan="3">				  				
												<input type="text" style="width:350px" id="remark" class="input_are"  name="order.remark" value="${order.remark}"/>
											</td>			  			
										</tr>
													  	
										<tr style="height: 40px;">
											<td colspan="2" align="center">
												<input type="button" style="cursor: pointer;" class="buttons2" value="保  存" onclick="saveCheck()" />&nbsp;&nbsp;&nbsp;&nbsp;
												<input type="reset" style="cursor: pointer;" class="buttons2" value="重  置" />
											</td>
										</tr>
									</table>
									</div>
									</form>
								</td>
							</tr>
					    </table>
				    </td>
				</tr>
			</table>
		</div>
	</td>
	</tr>
	</table>
	<div class="bottom">版权所有：安徽朗坤物联网</div>
</body>
</html>